package cn.jetpiece.cloud.resource.app.modular.scan.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资源表
 * </p>
 *
 * @author XuJZ
 * @since 2020-01-09
 */
@TableName("sys_resource")
public class Resource implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 资源id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 资源编码
     */
    @TableField("code")
    private String code;

    /**
     * 资源名称
     */
    @TableField("name")
    private String name;

    /**
     * 应用编码
     */
    @TableField("app_code")
    private String appCode;

    /**
     * 类名称
     */
    @TableField("class_name")
    private String className;

    /**
     * 方法名称
     */
    @TableField("method_name")
    private String methodName;

    /**
     * 资源模块编码
     */
    @TableField("modular_code")
    private String modularCode;

    /**
     * 资源模块名称
     */
    @TableField("modular_name")
    private String modularName;

    /**
     * 资源初始化的服务器ip地址
     */
    @TableField("ip_address")
    private String ipAddress;

    /**
     * 资源url
     */
    @TableField("url")
    private String url;

    /**
     * http请求方法
     */
    @TableField("http_method")
    private String httpMethod;

    /**
     * 是否需要登录(Y:是 N:否)
     */
    @TableField("required_login_flag")
    private String requiredLoginFlag;

    /**
     * 是否需要鉴权标识(Y:是 N:否)
     */
    @TableField("required_permission_flag")
    private String requiredPermissionFlag;

    /**
     * 内部接口，是：网关拦截请求，仅内部微服务可调用
     */
    @TableField("internal")
    private Boolean internal;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAppCode() {
        return appCode;
    }

    public void setAppCode(String appCode) {
        this.appCode = appCode;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getModularCode() {
        return modularCode;
    }

    public void setModularCode(String modularCode) {
        this.modularCode = modularCode;
    }

    public String getModularName() {
        return modularName;
    }

    public void setModularName(String modularName) {
        this.modularName = modularName;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getHttpMethod() {
        return httpMethod;
    }

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod;
    }

    public String getRequiredLoginFlag() {
        return requiredLoginFlag;
    }

    public void setRequiredLoginFlag(String requiredLoginFlag) {
        this.requiredLoginFlag = requiredLoginFlag;
    }

    public String getRequiredPermissionFlag() {
        return requiredPermissionFlag;
    }

    public void setRequiredPermissionFlag(String requiredPermissionFlag) {
        this.requiredPermissionFlag = requiredPermissionFlag;
    }

    public Boolean getInternal() {
        return internal;
    }

    public void setInternal(Boolean internal) {
        this.internal = internal;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Resource{" +
                "id=" + id +
                ", code=" + code +
                ", name=" + name +
                ", appCode=" + appCode +
                ", className=" + className +
                ", methodName=" + methodName +
                ", modularCode=" + modularCode +
                ", modularName=" + modularName +
                ", ipAddress=" + ipAddress +
                ", url=" + url +
                ", httpMethod=" + httpMethod +
                ", requiredLoginFlag=" + requiredLoginFlag +
                ", requiredPermissionFlag=" + requiredPermissionFlag +
                ", internal=" + internal +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}
